package com.base.common.config;

/**
 * 
 */
public class RepositoryConst {
	public final static String REPOSITORY_RESOUREC_NAME = "docresources";// 知识库名字
	public final static String REPOSITORY_NOTFIND_NAME = "docresourcesForNotFind";// 放置不可搜索附件的知识库
	public final static String REPOSITORY_SWF_NAME = "swfDoc";// 放置不可搜索附件的知识库
	public final static String REPOSITORY_CLIPBOARD = "doc_clipboard";// 剪贴板文档
	public final static String REPOSITORY_BORROW = "doc_borrow";// 借阅的文档
	public final static String REPOSITORY_FAVORITE = "doc_favorite";// 收藏的文档
	public final static String REPOSITORY_ENCYCLIC = "doc_encyclic";// 传阅的文档
	public static final String REPOSITORY_REUPLOAD_FILE_NAME = "doc_upload_fileNames";// 上传的文档
	public static final String REPOSITORY_CURRENTPATH = "current_path";// 文档的当前路径
	public static final String REPOSITORY_COPY_FILES = "doc_copy";// 复制文档
	public static final String REPOSITORY_MARK_SHROTCUT = "mark_shortcut";// 复制文档
	// 知识库目录结构
	public static final String REPOSITORY_OTHERDOC = "其他文档";
	public static final String REPOSITORY_ARCHIVEDOC = "档案文档";
	public static final String REPOSITORY_WORKAFFAIRDOC = "事项文档";
	public static final String REPOSITORY_DEMANDDOC = "跟踪文档";
	public static final String REPOSITORY_DEPARTMENTDOC = "文档库";
	public static final String REPOSITORY_PROJECTDOC = "系统文件";
	// 君豪项目，前期项目，运行期项目文档
	public static final String REPOSITORY_PROPERTYPROJECTDOC = "项目文件";
	public static final String REPOSITORY_REPOSITORYDOC = "知识库";
	public static final String REPOSITORY_SHORTCUTDOC = "体系文件";
	// public static final String REPOSITORY_SWFDOC = "swfDoc";
	public static final String REPOSITORY_NOTICEDOC = "通知";
	public static final String APPROVE_REPOSITORYDOC_SECURITYGROUP = "approveRepositoryDocGroup";// 知识库审批群组
	public static final String MARK_SHORTCUT_SECURITYGROUP = "shortcutRepositoryDocGroup";// 体系文件管理员群组

	// 待发布系统文件目录，add by wt 20110303
	public static final String NOTFINDREPOSITORY_WAITFORPUBLISHSYSTEMDOC = "待发布系统文件";
	// 待发布区域系统文件管理员群组，add by wt 20110303
	public static final String WAITFORPUBLISHSYSTEMDOCADMIN_SECURITYGROUP = "waitForPublishSystemDocAdminGroup";// 待发布区域系统文件管理员群组
	// 系统文件删除管理员群组，add by wt 20110331
	public static final String SYSTEMDOCDELETE_SECURITYGROUP = "systemDocDeleteAdminGroup";// 系统文件删除管理员群组

	public static final String PROP_SYSTEMDOCDISTPATH = "projectDocDistPath";

	public static final String PROP_SRCDEPARTMENTDOCPATH = "srcDepartmentDocPath";

	public static final String PROP_SRCDEPARTMENTDOCNODEID = "srcDepartmentDocNodeId";

	/**
	 * 通知路径
	 */
	public static final String REPOSITORY_NOTICEDOCPATH = "/"
			+ REPOSITORY_DEPARTMENTDOC + "/办公室/" + REPOSITORY_NOTICEDOC + "/";

	public static final String REPOSITORY_FLASHDOC = "查看文档";

	public static final String REPOSITORY_ADDEDITDOCMETADATEBEAN = "doc_setMetadata";
	public static final String REPOSITORY_OTHERDOC_TABID = "showOtherdocByStyle";
	public static final String REPOSITORY_WORKAFFAIRDOC_TABID = "showWorkAffairdocByStyle";
	public static final String REPOSITORY_DEMANDDOC_TABID = "showDemanddocByStyle";
	public static final String REPOSITORY_DEPARTMENTDOC_TABID = "showDeptdocByStyle";
	public static final String REPOSITORY_SHORTCUTDOC_TABID = "showShortcutDocByStyle";
	public static final String REPOSITORY_PROJECTDOC_TABID = "showPrjdocByStyle";
	public static final String REPOSITORY_REPOSITORYDOC_TABID = "showKBaseDocByStyle";
	public static final String REPOSITORY_FLASHDOC_TABID = "showFlashFile";

	// 正则表达式
	// 日期的正则
	public static final String REPOSITORY_REGULAR_DATE = "([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8])))";
	// 浮点数的正则
	public static final String REPOSITORY_REGULAR_DOUBLE = "[0-9]+(.[0-9]+)?";
	// 整型的正则
	public static final String REPOSITORY_REGULAR_LONG = "[1-9]+[0-9]*";
	// 英文正则
	public static final String REPOSITORY_REGULAR_ENGLISH = "[0-9a-zA-Z]*";
	// 数字正则
	public static final String REPOSITORY_REGULAR_NUMBER = "[0-9]*";
	// 带下划线的英文正则
	public static final String REPISITORY_REGULAR_UNDERLINE_ENGLISH = "[0-9a-zA-Z_]*";

	// alert 系统提示信息
	public static final String REPOSITORY_TIMEOUT = "系统超时,请重试";// 系统超时

	public static final String REPOSITORY_INFO_NOCOPYPATH = "没有选择复制路径，请选择复制路径";

	public static final String REPOSITORY_INFO_NO_PERSON_ENCYLIC = "没有传阅人，请重试";
	public static final String REPOSITORY_INFO_ONLYONESELECTED = "只能选择一个文档";
	public static final String REPOSITORY_INFO_NODOCDIR = "你请求的文档/文件夹不存在，请重试";
	public static final String REPOSITORY_INFO_NODOCSELECTED = "没有文档进行选择，请你选择一个文档进行操作";
	public static final String REPOSITORY_INFO_DUPLICATE_FILENAME = "文件名已经存在";
	public static final String REPOSITORY_INFO_ADD_DIR = "创建目录成功";
	public static final String REPOSITORY_INFO_SUCCESS_COPY = "复制成功";
	public static final String REPOSITORY_INFO_SUCCESS_FAVORITE = "收藏成功";
	public static final String REPOSITORY_INFO_SUCCESS_CLIPBOARD = "放置完毕!";
	public static final String REPOSITORY_INFO_FAIL_SAVE = "该文档的自定义属性已保存成功";

	public static String getShowFlashFileName(String path) {
		String ret = "showFlashFile";
		if (path == null) {
			return ret;
		} else if (path.startsWith("/" + RepositoryConst.REPOSITORY_PROJECTDOC))
			ret = "showFlashFileForSystem";
		else if (path
				.startsWith("/" + RepositoryConst.REPOSITORY_DEPARTMENTDOC))
			ret = "showFlashFileForDocManager";
		else if (path
				.startsWith("/" + RepositoryConst.REPOSITORY_REPOSITORYDOC))
			ret = "showFlashFileForRepository";
		return ret;
	}
}
